/* 我的接口 */
export default [
	// 测试列表
	{
		name: "getShangPin",
		url: "/shangpin/getShangPin",
		loading: false, //提示加载中
		sync: false, //同步异步
		method: 'get' //请求方式
	},

	// 测试数据
	{
		name: 'testData',
		url: '/banner/homeBanner'
	}
]


import http from "@/common/request";
// 上传头像
export const upImg = ({}, data = {}) => {
	if (typeof data == 'string') data = {
		path: data
	}
	console.log(data)
	let {
		name,
		path,
		formData,
		header
	} = data;
	return http.upload("/Upload/fileUpload", {
		fileType: "image",
		filePath: path,
		name: name || "file",
		header,
		formData: {
			...formData,
			type: 0
		},
		loading: false,
	});
}